﻿using BCEntity.MakeStaticPagingComponent.WebsiteTemplateAttachment;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.MakeStaticPagingComponent.WebsiteTemplateAttachment
{
    /// <summary>
    /// 网站模板附件
    /// </summary>
    public interface IWebsiteTemplateAttachmentData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="websiteTemplateAttachmentId">网站模板附件Id</param>
        Task<bool> Exists(int websiteTemplateAttachmentId);
        /// <summary>
        /// 增加网站模板附件
        /// </summary>
        /// <param name="entity">网站模板附件信息</param>
        Task<WebsiteTemplateAttachmentEntity> Add(WebsiteTemplateAttachmentEntity entity);
        /// <summary>
        /// 更新网站模板附件
        /// </summary>
        /// <param name="entity">网站模板附件信息</param>
        Task<WebsiteTemplateAttachmentEntity> Update(WebsiteTemplateAttachmentEntity entity);
        /// <summary>
        /// 删除网站模板附件
        /// </summary>
        /// <param name="websiteTemplateAttachmentId">网站模板附件Id</param>
        Task<bool> Delete(int websiteTemplateAttachmentId);
        /// <summary>
        /// 获取网站模板附件
        /// </summary>
        /// <param name="websiteTemplateAttachmentId">网站模板附件Id</param>
        Task<WebsiteTemplateAttachmentEntity> GetEntity(int websiteTemplateAttachmentId);
        /// <summary>
        /// 获取网站模板附件列表
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        Task<IEnumerable<WebsiteTemplateAttachmentEntity>> GetList(int websiteTemplateId);
        /// <summary>
        /// 获取网站模板附件分页列表
        /// </summary>
        /// <param name="websiteTemplateId">网站模板Id</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        Task<(IEnumerable<WebsiteTemplateAttachmentEntity>, int)> Query(int websiteTemplateId,DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        #endregion  成员方法
    }


}